package cn.itcast.nems.journal.dto;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@NoArgsConstructor
public class JournalRenewalLineDiscountDTO implements Serializable,Comparable<JournalRenewalLineDiscountDTO> {
    /**
     * 短训升班凭单ID
     */
    private String journalRenewalId;
    /**
     * 短训升班凭单行ID
     */
    private String journalRenewalLineId ;
    /**
     * 优惠ID
     */
    private String discountId;
    /**
     * 优惠名称
     */
    private String discountName ;
    /**
     * 优惠类型
     */
    private String discountType;
    /**
     * 优惠范围类型；枚举值：一般｜NORMAL、个人｜PERSONAL
     */
    private String discountScopeType ;
    /**
     * 优惠凭单行ID
     */
    private String journalDiscountLineId ;
    /**
     * 优惠折扣
     */
    private BigDecimal discountRate ;
    /**
     * 	优惠金额
     */
    private BigDecimal discountAmount;
    /**
     * 优惠规则排序号
     */
    private Integer sort;

    @Override
    public int compareTo(JournalRenewalLineDiscountDTO o) {
        return this.sort.compareTo(o.getSort());
    }

    public JournalRenewalLineDiscountDTO(String discountId, String discountName, String discountType,
                                         String discountScopeType, String journalDiscountLineId,
                                         BigDecimal discountRate, BigDecimal discountAmount) {
        this.discountId = discountId;
        this.discountName = discountName;
        this.discountType = discountType;
        this.discountScopeType = discountScopeType;
        this.journalDiscountLineId = journalDiscountLineId;
        this.discountRate = discountRate;
        this.discountAmount = discountAmount;
    }
}
